package com.xneure.enging.event;

import com.xneure.enging.RequestContext;
import com.xneure.utils.bean.GUID;


public class Notify {
	public enum NotifyType{
		ATTRIBUTE, CREATE, DEL, ADD,CSS
	}
	
	private GUID srcId;
	private EventNotify event;
	public Notify(GUID id) {
		srcId = id;
		RequestContext.register(this);
	}

	public GUID getSrcId() {
		return srcId;
	}

	public void setSrcId(GUID srcId) {
		this.srcId = srcId;
	}

	public void change(NotifyType type, String name, Object value) {
		if (null != event) {
			event.activate(type, name, value,srcId);
		}
	}

	public EventNotify getEvent() {
		return event;
	}

	public void setEvent(EventNotify event) {
		this.event = event;
	}

}
